perm filename DISPLA[DOC,TOB] blob sn#157472 filedate 1975-04-30 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002			NOTES BY TOB
C00004 00003	Hidden Line Elimination by Miyamoto
C00008 ENDMK
CāŠ—;
		NOTES BY TOB
Visible edge: at least one visible face.  This fails at concavities.

ALGORITHM: BUILD UP AN ORDERED CONTOUR OF THE OBJECT:
	all edges with only one visible face
Follow  along the  contour.    Any  face hidden  behind  the  contour
requires  comparison with  only a  couple  of faces  to find  out its
boundary.  This  is not  sensitive to where  you start,  and probably
works with  non-cones.  Certainly works  for non-convexities and even
with holes. 

This algorithm  can be extended to multi-body display.  It depends on
comparing only against visible  "islands" in an ordered  fashion that
seems quite economical. 

TEST CASES
Non-convex cross section
Hollow cylinder
small object in from of large (containment in 2d)
piercing holes
Hidden Line Elimination by Miyamoto

Algorithm
  Within a part
    Is cross section visible?
      Dot  product of  normal  to cross  section;  input samples  are
      ordered in the sense of a right hand screw. 
    Is each longitudinal plane visible?
      Does not  check  dot product,  but checks  angle  of the  cross
      section edge X with respect to the longitudinal edge L.  If the
      angle X,L ccw is less than pi, the surface is visible. 

		..................................
	       .				. .
	      .				       .   .
	     .				      .     .
	    .				     .	     .
	   .				    .	      .
	  ............ L ...................	       .
	   .				    .         .
	    .				     .       .
	     X				      .     .
	      .				       .   .
	       .				. .
		..................................


     Generate the contour of of part clockwise.

  II Between Parts
    II.A Compare Each Part vs Every Other Part
     Compute the bounding rectangle, (xmin,ymin) (xmax,ymax) for each
     part.  Calculate whether the other can overlap.  If the bounding
     rectangles overlap,  then there is  a possibility  that the  two
     parts overlap.   Determine for each edge on  the contour whether
     there  is an intersection  within the interval of  the line.  If
     so, determine  the nearer  line.   In  some cases,  there is  no
     intersection.   Consider a small object  entirely behind another
     object.  In that case, the apparent intersections of an edge  of
     one object with the contour of the  other (the points on contour
     of  B which  coincide in  projection  with an  edge of  part A).
     Determine which is closer, the edge in A or the line between the
     two apparent intersections in B.   If the object is outside, the
     two  points are on  the same side of  the edge of  A, and can be
     ignored.  The process must be done for both  parts.  In the case
     of  overlap, either kind  of information  will appear.  He  uses
     that which appears earlier. 
    II.B Remove Hidden Portions of Lines
      If the line from  above between crossing points is  closer than
      the contour line, then eliminate the portion of the line within
      the line between apparent crossing points.  Check for all lines
      in this way.  Causes additional segments in lines.